package com.yanqu.road.entity.activity.dunhuangshiku;

import com.yanqu.road.entity.DataObject;
import com.yanqu.road.entity.FieldTypeAnnotation;
import com.yanqu.road.entity.DataStatus;

/**
 * @Description 敦煌石窟日志信息
 * @Author cwq
 * @Data 2021/4/15 18:49
 */
@FieldTypeAnnotation(tableName = "t_c_dunhuangshiku_kill_log_data")
public class DunHuangShiKuKillLogData extends DataObject {
    @FieldTypeAnnotation(select = true)
    private int activityId;
    @FieldTypeAnnotation(desc = "日志类型0击杀日志 1玩家对我攻击日志 2队友协助我的日志")
    private byte type;
    @FieldTypeAnnotation(desc = "记录所属玩家(type 为1、2才有)")
    private long userId;
    @FieldTypeAnnotation(desc = "攻击者id")
    private long attackerId;
    @FieldTypeAnnotation(desc = "击杀类型,0玩家,1NPC (type为0、2才有)")
    private byte killType;
    @FieldTypeAnnotation(desc = "目标玩家id/npcId (type为0、2才有)")
    private long targetId;
    @FieldTypeAnnotation(desc = "目标玩家所在区服 ype=0才有 (type为0、2才有)")
    private long targetServerId;
    @FieldTypeAnnotation(desc = "目标玩家名称 ype=0才有 (type为0、2才有)")
    private String targetName = "";
    @FieldTypeAnnotation(desc = "伤害")
    private long damage;
    @FieldTypeAnnotation(desc = "真实击杀玩家的id(type为0才有)")
    private long realKillId;
    @FieldTypeAnnotation(desc = "事件id")
    private int eventId;
    @FieldTypeAnnotation(desc = "击杀获取珍贵文书数量")
    private int bookNum;
    @FieldTypeAnnotation(desc = "获得的奖励")
    private String reward ="";
    @FieldTypeAnnotation(desc = "当前击杀人数")
    private int killNum;
    @FieldTypeAnnotation(desc = "时间")
    private int logTime;

    public void setActivityId(int activityId) {
        if (this.activityId != activityId) {
            this.activityId = activityId;
            setOp(DataStatus.Update);
        }

    }

    public void setUserId(long userId) {
        if (this.userId != userId) {
            this.userId = userId;
            setOp(DataStatus.Update);
        }

    }
    public void setAttackerId(long attackerId) {
        if (this.attackerId != attackerId) {
            this.attackerId = attackerId;
            setOp(DataStatus.Update);
        }

    }

    public void setTargetId(long targetId) {
        if (this.targetId != targetId) {
            this.targetId = targetId;
            setOp(DataStatus.Update);
        }

    }
    public void setTargetServerId(long targetServerId) {
        if (this.targetServerId != targetServerId) {
            this.targetServerId = targetServerId;
            setOp(DataStatus.Update);
        }

    }
    public void setTargetName(String targetName) {
        if(null == targetName){
            return;
        }
        if(!this.targetName.equals(targetName)) {
            this.targetName = targetName;
            setOp(DataStatus.Update);
        }
    }

    public void setDamage(long damage) {
        if (this.damage != damage) {
            this.damage = damage;
            setOp(DataStatus.Update);
        }

    }

    public void setRealKillId(long realKillId) {
        if (this.realKillId != realKillId) {
            this.realKillId = realKillId;
            setOp(DataStatus.Update);
        }
    }

    public void setEventId(int eventId) {
        if (this.eventId != eventId) {
            this.eventId = eventId;
            setOp(DataStatus.Update);
        }

    }
    public void setBookNum(int bookNum) {
        if (this.bookNum != bookNum) {
            this.bookNum = bookNum;
            setOp(DataStatus.Update);
        }

    }

    public void setReward(String reward) {
        if(null == reward){
            return;
        }
        if(!this.reward.equals(reward)) {
            this.reward = reward;
            setOp(DataStatus.Update);
        }
    }

    public void setKillNum(int killNum) {
        if (this.killNum != killNum) {
            this.killNum = killNum;
            setOp(DataStatus.Update);
        }

    }

    public void setLogTime(int logTime) {
        if (this.logTime != logTime) {
            this.logTime = logTime;
            setOp(DataStatus.Update);
        }

    }

    public int getActivityId() {
        return activityId;
    }

    public byte getType() {
        return type;
    }

    public void setType(byte type) {
        this.type = type;
    }

    public long getUserId() {
        return userId;
    }

    public long getAttackerId() {
        return attackerId;
    }

    public byte getKillType() {
        return killType;
    }

    public void setKillType(byte killType) {
        this.killType = killType;
    }

    public long getTargetId() {
        return targetId;
    }

    public long getTargetServerId() {
        return targetServerId;
    }

    public String getTargetName() {
        return targetName;
    }

    public long getDamage() {
        return damage;
    }

    public int getEventId() {
        return eventId;
    }

    public int getLogTime() {
        return logTime;
    }

    public String getReward() {
        return reward;
    }

    public int getKillNum() {
        return killNum;
    }

    public int getBookNum() {
        return bookNum;
    }

    public long getRealKillId() {
        return realKillId;
    }
}
